﻿<local:DocumentBase x:Class="ReflectionStudio.Components.UserControls.HomeDocument"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls"
    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
    Title="Home" ToolTip="Home" IsCloseable="False">
    
    <Grid Background="{DynamicResource NormalBackgroundBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="90" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="170" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Image Grid.ColumnSpan="2" HorizontalAlignment="Left"  Name="image1" Stretch="Uniform" Width="90" VerticalAlignment="Top" Source="/ReflectionStudio;component/Resources/Images/128x128/reflection_studio.png" />
        <Label Grid.ColumnSpan="2" HorizontalAlignment="Left" Name="label1" VerticalAlignment="Center" Content="Reflection Studio" FontSize="24" Margin="100,29,0,29" FontWeight="Bold" />

        <StackPanel Grid.Column="0" Grid.Row="2" Margin="6" VerticalAlignment="Stretch" >
            <Label Height="40"></Label>
            <TabItem  Header="New project..."/>
            <TabItem  Header="Open project..."/>
            <Label Height="20"></Label>
            <Label>Recent Files</Label>
            <ListBox ItemsSource="{Binding Workspace.RecentFiles}" VerticalAlignment="Stretch" DisplayMemberPath="FullName"></ListBox>
        </StackPanel>
        <TabControl Grid.Column="1" Grid.Row="1">
            <TabItem Header="Home">
                <Grid>
                    <FlowDocumentScrollViewer Name="FlowDocViewer">
                        <FlowDocument>
                            <Paragraph >
                                <Image Source="/ReflectionStudio;component/Resources/Images/32x32/reflection_studio.png" Width="50"></Image>
                                <Bold>Reflection Studio</Bold>
                            </Paragraph>
                            <Paragraph>
                                <Run FontSize="13" FontWeight="Bold">
                                    Loading...
                                </Run>
                            </Paragraph>
                        </FlowDocument>
                    </FlowDocumentScrollViewer>
                    <ucd:WaitSpin Name="WaitPanel" AutoPlay="True" Elem="{Binding ElementName=FlowDocViewer}"/>
                </Grid>
            </TabItem>
            <TabItem Header="Rss">
                <Grid Grid.Column="1" Grid.Row="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="30" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <StackPanel Orientation="Horizontal">
                        <ComboBox Grid.Row="1" Name="comboUri" HorizontalAlignment="Stretch" MinWidth="200">
                            <ComboBoxItem Content="http://weblogs.asp.net/expertzone/Rss.aspx" />
                            <ComboBoxItem Content="http://weblogs.asp.net/expertzone/Rss.aspx" />
                            <ComboBoxItem Content="http://weblogs.asp.net/expertzone/Rss.aspx" />
                        </ComboBox>
                        <Button Grid.Row="1" Name="test">Refresh...</Button>
                    </StackPanel>
                    <ucd:SyndicationFeedListBox Grid.Row="2"
                                                x:Name="SyndicationFeedListBox"
                                                FeedUri="{Binding ElementName=comboUri, Path=SelectedItem.Content}"
                                                RefreshButtonName="test"
                                                />
                </Grid>
            </TabItem>
        </TabControl>
        
        
    </Grid>
</local:DocumentBase>
